<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="../css/queryList.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/js/jquery-3.6.0.min.js"></script>
</head>
<body>
<div th:include="common/inc"></div>
<div role="tabpanel" id="pane-reletive" aria-labelledby="tab-reletive" class="el-tab-pane">
    <div>
        <div class="presentation-item" th:each="pl:${list}">
            <div class="fn-clear">
                <input type="hidden" name="userId" th:value="${pl.userId}">     <!--应聘者id-->
                <input type="hidden" name="positionId" th:value="${pl.positionId}">
                <div class="fn-left position" th:text="${pl.userName}"></div>
                <span class="fn-left source"><input type="button" value="查看" th:onclick="|information(${pl.positionId},${pl.userId})|" class="btn-success"></span>

                <div th:if="${pl.status} ne null">
                    <span class="fn-left source"><input id="toDeliver" type="button" value="查看简历" th:onclick="|information1(${pl.positionId},${pl.userId})|" class="btn-success"></span>
                </div>

            </div>
        </div>
    </div>
</div>
</body>

<script>
/*
    var positionId = $("#positionId").val();//获取某个input框的值
    var userId = $("#userId").val();

    $(function(){
        getDeliver(positionId,userId);
    })
*/
    //查询
    function information(positionId,userId){
        location.href="/information/getInformation?positionId="+positionId+"&userId="+userId;
    }
/*
    //查询是否被投递
    function getDeliver(positionId,userId){
        $.ajax({
            url:"/information/getDeliver1",
            type:"post",
            data:{"positionId":positionId,"userId":userId},
            dataType:"json",
            success:function (data){
                if(data != null){
                    $("#toDeliver").show();
                } else {
                    $("#toDeliver").hide();
                }
            },error:function (){
                <!--若是没查到数据，即返回值为空，就会走error方法-->
                $("#toDeliver").hide();
            }
        })
    }
*/
    //查询简历
    function information1(positionId,userId){
        location.href="/resume/getResume1?positionId="+positionId+"&userId="+userId;
    }

</script>
</html>